home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 54.zip / BS part 54 / FinalCopyII.adf / SampleMacros / ToBold < prev    next >
Encoding:
Text File  |  1992-10-12  |  1.1 KB  |  41 lines

  1. /* -----------------------------------------    */
  2. /* Final Copy II Arexx Macro - TO BOLD        */
  3. /* Set the font at the insertion point to    */
  4. /* Bold. Note that this will only work for    */
  5. /* fonts whose styled names start with '_'    */
  6. /* (the underscore character) such as        */
  7. /* X X_Italic, X_Bold, X_BoldItalic.        */
  8. /* -----------------------------------------    */
  9. Options Results
  10.  
  11. /* ------------------------------ */
  12. /* Get the complete font pathname */
  13. /* ------------------------------ */
  14. Status FontPath
  15. fontpath = Result
  16.  
  17. /* ------------------------------------- */
  18. /* Get only the font filename (w/o path) */
  19. /* ------------------------------------- */
  20. Status FontName
  21. fontname = Result
  22.  
  23. /* -------------------------------- */
  24. /* Does the file name have an '_'   */
  25. /* This will signify if the forn is */
  26. /* normal or styled.                */
  27. /* -------------------------------- */
  28. pos = LASTPOS('_', fontname)
  29. IF    (pos == 0) THEN
  30.     DO
  31.     fontpath = fontpath || '_Bold'
  32.     END
  33. ELSE    DO
  34.     pos = LASTPOS('_', fontpath)
  35.     fontpath = DELSTR(fontpath, pos)
  36.     fontpath = fontpath || '_Bold'
  37.     END
  38.  
  39. Font fontpath
  40.  
  41.